<template>
  <div class="skill">
    <div class="left">
      <div class="top">
        {{ item.title }}
      </div>
      <div class="bottom">
        <div class="time">{{ item.created_at | hmfilter }}</div>
        <div class="read">
          <i class="iconfont iconicon_liulanliang"></i>{{ item.read }}
        </div>
        <div class="star">
          <i class="iconfont iconbtn_dianzan_small_nor"></i>{{ item.star }}
        </div>
      </div>
    </div>
    <div class="right">
      <img :src="baseURL + item.cover" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  // 接收数据源
  props: ['item'],
  data () {
    return {
      baseURL: process.env.VUE_APP_URL
    }
  }
}
</script>

<style lang="less">
.skill {
  padding: 15px;
  display: flex;
  .left {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    .top {
      font-weight: 700;
      font-size: 16px;
      line-height: 1.25em;
    }
    .bottom {
      font-size: 12px;
      color: #cacad0;
      display: flex;
      align-items: center;
      .time {
        flex: 1;
      }
      .read {
        margin-right: 20px;
        .iconfont {
          margin-right: 6px;
        }
      }
      .star {
        .iconfont {
          margin-right: 6px;
        }
      }
    }
  }
  .right {
    img {
      margin-left: 10px;
      width: 113px;
      height: 75px;
      display: block;
    }
  }
}
</style>
